const useLocal = {
  hasLocal(key: string) {
    return !!window.localStorage.getItem(key);
  },
  getLocal(key: string) {
    return window.localStorage.getItem(key) || "";
  },
  setLocal(key: string, data: any) {
    window.localStorage.setItem(key, data);
    return true;
  },
  removeLocal(key: string){
    window.localStorage.removeItem(key)
  },
  clearLocal(){
    window.localStorage.clear()
  }
};


export  { useLocal }
